/**
 * 
 */
package auction.chapter08;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * @author Wei Sun
 *
 */
public class UserFKToCompPK implements Serializable{
	private String userName;
	private String departmentNr;
	
	private String firstName;
	private String lastName;
	
	private Set<ItemFKToCompPK> items=new HashSet<ItemFKToCompPK>();
	
	public UserFKToCompPK(){
		
	}
	
	public void addItem(ItemFKToCompPK i){
		this.items.add(i);
		i.setUser(this);
	}
	
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getDepartmentNr() {
		return departmentNr;
	}

	public void setDepartmentNr(String departmentNr) {
		this.departmentNr = departmentNr;
	}

	public Set<ItemFKToCompPK> getItems() {
		return items;
	}

	public void setItems(Set<ItemFKToCompPK> items) {
		this.items = items;
	}
	
}
